<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>主机备件管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/inventory/zlmtAccessoryStore/">备件列表</a></li>
		<li><a href="${ctx}/inventory/zlmtAccessoryStore/form">新备件录入</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="zlmtAccessoryStore" action="${ctx}/inventory/zlmtAccessoryStore/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label class="control-label">备件名：</label>
				<form:input path="accessoryName" htmlEscape="false" maxlength="128" class="input-xlarge "/>
			</li>
			<li><label class="control-label">分类：</label>
				<form:select path="accessoryCategory" class="input-xlarge">
					<form:options items="${fns:getDictList('accessory_cate')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
				<label class="control-label">型号：</label>
				<form:input path="model" htmlEscape="false" maxlength="128" class="input-xlarge "/>
			</li>
			<li>
				<label class="control-label">品牌：</label>
				<form:input path="brand" htmlEscape="false" maxlength="128" class="input-xlarge "/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>配件名</th>
				<th>分类</th>
				<th>型号</th>
				<th>品牌</th>
				<th>数量</th>
				<th>联系信息</th>
				<th>购买时间</th>
				<th>质保时间</th>
				<th>备注信息</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="zlmtAccessoryStore">
			<tr>
				<td>${zlmtAccessoryStore.accessoryName}</td>
				<td>${fns:getDictLabel(zlmtAccessoryStore.accessoryCategory, "accessory_cate", "未知")}</td>
				<td>${zlmtAccessoryStore.model}</td>
				<td>${zlmtAccessoryStore.brand}</td>
				<td>${zlmtAccessoryStore.amount}</td>
				<td>${zlmtAccessoryStore.contact}</td>
				<td><fmt:formatDate value="${zlmtAccessoryStore.purchaseDate}" pattern="yyyy-MM-dd"/></td>
				<td><fmt:formatDate value="${zlmtAccessoryStore.warrantyDate}" pattern="yyyy-MM-dd"/></td>
				<td>${zlmtAccessoryStore.remarks}</td>
				<td>
					<a href="${ctx}/inventory/zlmtAccessoryInout/inout?accessoryStoreId=${zlmtAccessoryStore.id}&inoutType=OUT">出库处理</a>
					<a href="${ctx}/inventory/zlmtAccessoryInout/inout?accessoryStoreId=${zlmtAccessoryStore.id}&inoutType=IN">入库处理</a>
    				<a href="${ctx}/inventory/zlmtAccessoryStore/form?id=${zlmtAccessoryStore.id}">修改</a>
					<a href="${ctx}/inventory/zlmtAccessoryStore/delete?id=${zlmtAccessoryStore.id}" onclick="return confirmx('确认要删除该主机备件吗？', this.href)">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>